<?php if ($request == 'main_page'):?>
<!-- <div class="row join_us staff_activities"> -->
<script>
$(function() {
	$().containerSimulator();
});
</script>
	<div class="span12 center-content">
		<div class="inner-content pull-right" >
			<div class="span11">
				<?php foreach ($activities as $v):?>
				<div class="span5 activities" style="background-image: url(<?php echo $v['pic'][0]['thumb_path']?>);">
					<span class="detail-plus" id="<?php echo $v['id']?>">+</span>
					<div class="caption">
						<div class="title"><?php echo $v['name'] ?></div>
						<div class="sub_title"><?php echo $v['sub_title']?></div>
					</div>
				</div>
				<?php endforeach;?>
				<div id="activity_color_box"></div>
			</div>
		</div>
	</div>
<!-- </div> -->
<?php elseif ($request == 'sub_page'):?>
<?php if ($pic):?>
<script>
$(function() {
	$("a[rel='cb_img']").colorbox({
		open: true,
		onOpen: function() {
			/* cboxPage */
			$("#cboxBottomCenter").html('<div id="cboxPage"></div>');

			$(this).parent().children('a').each(function() {
				$("#cboxPage").append('<span class="cboxPageBtn"></span>');
			});

			var btn_num = $(this).parent().children('a').size();
			var cboxPage_width = (parseFloat($(".cboxPageBtn").css('width')) + parseFloat($(".cboxPageBtn").css('margin-right'))) * btn_num;
			$("#cboxPage").css({ 'width': cboxPage_width });
			/* cboxPage */
		},
		onLoad: function() {
			/* cboxPage */
			var rel = $(this).attr('rel');
			var current = $("a[rel='" + rel + "']").index(this);
			$("#cboxPage span").siblings().removeClass('active');
			$("#cboxPage span").eq(current).addClass('active');
			/* cboxPage */
		},
	});
});
</script>
	<?php foreach ($pic as $v):?>
	<?php if ($v['weight'] != 1):?>
	<a href="<?php echo $v['photo_path']?>" rel="cb_img" title="&lt;div class='title'&gt;<?php echo $activity['name']?>&lt;/div&gt;&lt;div class='sub_title'&gt;<?php echo $activity['sub_title']?>&lt;/div&gt;"></a>
	<?php endif;?>
	<?php endforeach;?>
<?php endif;?>
<?php endif;?>